<?php

namespace app\admin\controller;

use think\Request;

class Msg
{
    public static function message($code,$msg,$data){
        return json([
            'code'=>0,
            'msg'=>'',
            'data'=>$data
        ]);
    }
    public static function success($data = []){
        return self::message(0,'',$data);
    }
    public static function list($data){
        return json([
            'result'=>'success',
            'data'=>$data['data'],
            'message'=>'',
            'pager'=>[
                "page"=>$data['current_page'],
                "recTotal"=>$data['total'],
                "recPerPage"=>10
            ]
        ]);
    }
}
